<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="css/jquery.mobile-1.3.1.css" />
<link rel="stylesheet" type="text/css" href="css/login.css" />
	<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
	<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
<title>Insert title here</title>
<script src="nu.js"></script>
</head>
<body>
 <section id="boardRegisterPage" data-role="page" data-add-back-btn="true" data-url="./showPageList.nu?group_type=${param.category}&group_id=${param.group_id }&pageNo=1"> 
      <header data-role="header" data-position="fixed">
      <a href="menu.nu" data-role="button" class="ui-btn-right" data-icon="home">Home</a>
         <center><img src="././img/board.png" height="50"></center>
      </header>
      <div class="content" data-role="content">
      	<form action="writeContent.nu" method="post" data-ajax="false" enctype="multipart/form-data" id="boardRegisterForm" name="boardRegisterForm">
      		<p><font size="5" style="text-transform: uppercase;">${param.category }</font> 게시판 글쓰기</p>
      		<label for="title">제목</label>
    		<input type="text" name="title" id="boardRegisterTitle">
    		<label for="textarea">내용</label>
        	<textarea rows="40" cols="40" id="boardRegisterContent" name="content"></textarea>
        	<input type="file" name="uploadFileForBoard">
        	<input type="hidden" name="category" value="${param.category }">
        	<input type="hidden" name="group_id" value="${param.group_id }">
        	<input type="hidden" name="id" value="${param.id }">
        	<c:choose>
        		<c:when test="${param.category=='study'}">
        			<input type="hidden" name="nick_name" value="${sessionScope.login.study_nick }">
        		</c:when>
        		<c:when test="${param.category=='sports' }">
        			<input type="hidden" name="nick_name" value="${sessionScope.login.sports_nick }">
        		</c:when>
        		<c:when test="${param.category=='smoking' }">
        			<input type="hidden" name="nick_name" value="${sessionScope.login.smoking_nick }">
        		</c:when>
        		<c:when test="${param.category=='finance' }">
        			<input type="hidden" name="nick_name" value="${sessionScope.login.finance_nick }">
        		</c:when>
        		<c:when test="${param.category=='living' }">
        			<input type="hidden" name="nick_name" value="${sessionScope.login.living_nick }">
        		</c:when>
        	</c:choose>
        	<p>
        		<button><img src="././img/write_font2.png" height="20"></button>
   			</p>
        </form>
      </div>
    <footer data-role="footer" data-position="fixed">
      <p><center><img src="././img/footer.png" height="15"></center></p>
    </footer>
  </section>
</body>
</html>